Skip to main content

Insert Or Delete Columns

AutomatR.Excel.Activities.InsertOrDeleteColumns

The "Insert or Delete Columns" activity in AutomatR is part of the Excel activities package, designed to dynamically add or remove columns in Microsoft Excel based on the specified index or position. This activity provides flexibility in adjusting the structure of Excel worksheets, enhancing automation capabilities.

Properties

NameDescription
Input
Action TypeSelect the operation to either insert or delete columns. Options: Insert, Delete.
IndexEnter the index or position where the column addition or deletion occurs. Integer variables containing the index value.
No. Of ColumnsEnter the number of columns you wish to add or remove. Integer variables containing the number of columns.
Misc
Display NameThe display name of the activity. A display name is automatically generated when you indicate a target.
Optional
DelayEnter the wait time in seconds (Example 5 seconds, i.e., 5) to start the activity. Integer variables containing the delay duration.

How to use:

  1. Drag and drop the "Insert or Delete Columns" activity onto the workflow.
  2. Configure the properties by specifying the action type (insert or delete), index, and the number of columns.
  3. Optionally, configure the delay.
  4. Execute the workflow to dynamically insert or delete columns based on the specified parameters.

Example: Consider an example where the "Insert or Delete Columns" activity is used to insert three columns starting from the third column index:

Insert or Delete Columns:
ActionType: Insert
Index: 2
NoOfColumns: 3
Delay: 2

In this example, the activity inserts three columns starting from the third column index. The delay is set to 2 seconds, allowing time for any required synchronization.

Note: Ensure that the "Insert or Delete Columns" activity is placed within an "Excel Root" activity to establish the Excel context for execution.